package com.ecar.api.service.common;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.ecar.core.common.entity.Coupon;
import com.ecar.core.common.entity.CouponActivities;

public interface ActivityService {
	/**
	 * 获取激活发布活动
	 * @return
	 */
	public List<CouponActivities> queryCouponActivities();
	
	/**
	 * 领取优惠卷
	 */
	public boolean pullCoupon(Coupon coupon);
	
	public List<Coupon> selectNotUsedCoupon();
	
	public int updateByPrimaryKey(Coupon record);
	
	int updateByPrimaryKeySelective(Coupon record);
	
	int updateByPrimaryKeySelective(CouponActivities record);
	
	public Coupon selectByCouponActIdAndUserId(String couponId,String userId);
	
	List<CouponActivities> selectCouponByUserId(String passengerId);
	
	List<Coupon> selectByUserId(String passengerId);
	
	CouponActivities selectByPrimaryKey(String id);
	
	int updateCouponCountByActivityId(String couponActivityId,int couponCount);
}
